<div class="top-menu">
	<?php
	//echo Yii::app()->controller->id;
	$controllerId = strtolower(Yii::app()->controller->id);
	$this->widget('zii.widgets.CMenu', array(
			'items'=>array(
					array(	'label'=>'i-Booking',
							'url'=>array('RequestBooking/'),
							'active'=>strtolower(Yii::app()->controller->id) == 'requestbooking',
							'visible'=>UserLoginUtil::hasPermission(array("FULL_ADMIN", "VIEW_REQUEST_BOOKING", "VIEW_ALL_REQUEST_BOOKING", "CREATE_REQUEST_BOOKING", "UPDATE_REQUEST_BOOKING", "DELETE_REQUEST_BOOKING")),
					),
					array(	'label'=>'i-Borrow',
							'url'=>array('RequestBorrow/'),
							'active'=>strtolower(Yii::app()->controller->id) == 'requestborrow',
							'visible'=>UserLoginUtil::hasPermission(array("FULL_ADMIN", "VIEW_REQUEST_BORROW", "VIEW_ALL_REQUEST_BORROW", "CREATE_REQUEST_BORROW", "UPDATE_REQUEST_BORROW", "DELETE_REQUEST_BORROW")),
					),
					array(	'label'=>'i-Service',
							'url'=>array('RequestService/'),
							'active'=>strtolower(Yii::app()->controller->id) == 'requestservice',
							'visible'=>UserLoginUtil::hasPermission(array("FULL_ADMIN", "VIEW_REQUEST_SERVICE", "VIEW_ALL_REQUEST_SERVICE", "CREATE_REQUEST_SERVICE", "UPDATE_REQUEST_SERVICE", "DELETE_REQUEST_SERVICE")),
					),
					array(	'label'=>'i-Solution',
							'url'=>array('Solution/'),
							'active'=>strtolower(Yii::app()->controller->id) == 'solution',
							'visible'=>UserLoginUtil::hasPermission(array("FULL_ADMIN")),
					),
					array(	'label'=>'i-Report',
							'url'=>array('Report/'),
							'active'=>strtolower(Yii::app()->controller->id) == 'report',
							'visible'=>UserLoginUtil::hasPermission(array("FULL_ADMIN")),
					),
					array(	'label'=>'Admin',
							'url'=>array('Admin/'),
							'active'=>$controllerId != 'requestbooking' && $controllerId != 'report' && $controllerId != 'requestborrow' && $controllerId != 'requestservice' && $controllerId != 'solution',
							'visible'=>UserLoginUtil::hasPermission(array(
									"FULL_ADMIN",
									"CREATE_USER",
									"DELETE_USER",
									"UPDATE_USER",
									"VIEW_USER",
									"CREATE_ROLE",
									"DELETE_ROLE",
									"UPDATE_ROLE",
									"VIEW_ROLE",
									"CREATE_EQUIPMENT_TYPE",
									"DELETE_EQUIPMENT_TYPE",
									"UPDATE_EQUIPMENT_TYPE",
									"VIEW_EQUIPMENT_TYPE",
									"CREATE_EQUIPMENT",
									"DELETE_EQUIPMENT",
									"UPDATE_EQUIPMENT",
									"VIEW_EQUIPMENT",
									"CREATE_DEPARTMENT",
									"DELETE_DEPARTMENT",
									"UPDATE_DEPARTMENT",
									"VIEW_DEPARTMENT",
									"CREATE_ROOM",
									"DELETE_ROOM",
									"UPDATE_ROOM",
									"VIEW_ROOM",
									"CREATE_POSITION",
									"DELETE_POSITION",
									"UPDATE_POSITION",
									"VIEW_POSITION",
									"CREATE_PRESEN_TYPE",
									"DELETE_PRESENT_TYPE",
									"UPDATE_PRESENT_TYPE",
									"VIEW_PRESENT_TYPE",
									"CREATE_SERVICE_TYPE",
									"DELETE_SERVICE_TYPE",
									"UPDATE_SERVICE_TYPE",
									"VIEW_SERVICE_TYPE",
									"CREATE_SERVICE_TYPE_ITEM",
									"DELETE_SERVICE_TYPE_ITEM",
									"UPDATE_SERVICE_TYPE)ITEM",
									"VIEW_SERVICE_TYPE_ITEM",
									"CREATE_SEMESTER",
									"DELETE_SEMESTER",
									"UPDATE_SEMESTER",
									"VIEW_SEMESTER",)),
					),
			),
	));

	?>
</div>
